<?php
$tablelist = $this->tablelist;
include 'include_pagerform.php';
?>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="<?= $this->action ?>" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>名称查找：</td>
                    <td><input type="text" name="search[configclass.name]" value="<?= str($this->search['configclass.name']) ?>" /></td>
                    <td>所属分类：</td>
                    <td>
                        <select class="combox required" name="province">
                            <option value="">显示所有分类</option>
                        </select>
                    </td>
                    <td>
                        <div class="subBar">
                            <ul>
                                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                                <li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>

        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="?c=sys_configclass&a=info&id=0" target="dialog" width="530" height="400" rel="sys_configclass_add"><span>添加</span></a></li>
            <li><a class="edit" href="?c=sys_configclass&a=info&id={id}" target="dialog" width="530" height="400" rel="sys_configclass_info"><span>修改</span></a></li>
            <li><a class="delete" href="?c=sys_configclass&a=del" target="selectedTodo" rel="ids" postType="string" title="确实要删除这些记录吗?"><span>批量删除</span></a></li>
        </ul>
    </div>
    <table class="table" layoutH="118" targetType="dialog" width="100%">
        <thead>
            <tr align="center">
                <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl" /></th>
                <th orderfield="configclass.id">分类ID</th>
                <th orderfield="configclass.name">分类名称</th>
                <th orderfield="configclass.title">分类标题</th>
                <th orderfield="configclass.parentdir">上级名称</th>
                <th>所属公司项目模块</th>
                <th>状态</th>
                <th width="80">查找带回</th>
            </tr>
        </thead>
        <tbody>
            <?php
            foreach ($tablelist as $row) {
                ?>
                <tr align="center" target="id" rel="<?= $row['id'] ?>">
                    <td><input name="ids" type="checkbox"></td>
                    <td><?= $row['id'] ?></td>
                    <td><?= $row['name'] ?></td>
                    <td><?= $row['title'] ?></td>
                    <td><?= $row['parentdir'] ?></td>
                    <td><?= $row['companyname'] ?>-<?= $row['projectname'] ?></td>
                    <?
                    if ($row['del_time'] != 0) {
                        echo '<td style="color:red">已删除</td>';
                    } else if ($row['enable'] != 1) {
                        echo '<td style="color:#AAAAAA">已禁用</td>';
                    } else {
                        echo '<td style="color:green">正常</td>';
                    }
                    $array = array();
                    $array['configclassid'] = $row['id'];
                    $array['appname'] = $row['companyname'] . '-' . $row['projectname'];
                    $array['parentpath'] = (($row['parentdir'] == '') ? '' : $row['parentdir'] . '_') . $row['name'];
                    $json = json_encode($array);
                    ?>
                    <td>
                        <a class="btnSelect" href='javascript:$.bringBack(<?= $json ?>);' title="查找带回">选择</a>
                    </td>
                </tr>
                <?
            }
            ?>
        </tbody>
    </table>
    <?php
    include 'include_pagesbar.php';
    ?>
</div>